<script lang="ts" setup>
import { toRefs } from "vue"
import { storeToRefs } from 'pinia'
import { homeStoriesStore } from "../../store";
import { HomeDeatilType } from "@/typing";
import CategorySelect from '@/components/home/CategorySelect.vue'
const store = homeStoriesStore();
const { isShow } = storeToRefs(store);

const props = defineProps<{
    homeStories: Array<HomeDeatilType>
}>()

const { homeStories } = toRefs(props)
</script>

<!-- 主页文章列表 -->
<template>
    <div v-show="!isShow">
        <div class=" bg-gray-100" v-if="homeStories">
            <CategorySelect v-for="(c, i) in homeStories" :key="c.id" :category="c.category" :listItem="c" :index="i"
                class="rounded-2xl mb-5 bg-white" />
            <div class="h-52 pt-10 mt-5 bg-gray-50 text-center text-gray-400"> &lt; &lt;滑动查看上一个 </div>
        </div>
    </div>
</template>

